import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import pinia from './stores'
import * as Icons from '@element-plus/icons'

const app = createApp(App)

import './router/permission'

import './styles/global.scss'
import './assets/icon/iconfont.css'
import './assets/icon-symbol/iconfont.js'

app.use(router).use(pinia).mount('#app')

Object.keys(Icons).forEach(key => {
    app.component(key, Icons[key as keyof typeof Icons])
})

export default app
